package com.jetlion.sqlite.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DBHelper extends SQLiteOpenHelper {

    private static final int DB_VERSION = 1;
    private static final String DN_NAME = "student.db";
    private static final String TABLE_NAME = "score";


    public DBHelper(Context context) {
        super(context, DN_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        //建表语句
        String sql = "create table if not exists " + TABLE_NAME + "(stuNo text primary key,stuName text,stuSex text,stuScore integer)";

        //执行语句
        sqLiteDatabase.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
